package com.mes.system.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.context.annotation.Lazy;

import com.mes.common.domain.BasicModel;
import com.mes.common.util.SysUtil;

@Entity(name = "hxzz.mes.Role")
@Table(name = "S_ROLE")
@BatchSize(size = 10)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Role extends BasicModel implements java.io.Serializable {

	@Id
	@GenericGenerator(name = "uniqueId", strategy = "assigned")
	@Column(name = "ROLEID", length = 50)
	private String uniqueId;

	@Column(name = "ROLENAME", length = 50)
	private String roleName;

	@Column(name = "ROLEDESCRIPTION", length = 50)
	private String roleDescription;

	public Role() {
		this.setUuid(SysUtil.getUUID());
	}

	@Override
	public String getUuid() {
		return uniqueId;
	}

	@Override
	public void setUuid(String uuid) {
		this.uniqueId = uuid;
	}

	public String getUniqueId() {
		return uniqueId;
	}

	public void setUniqueId(String uniqueId) {
		this.uniqueId = uniqueId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleDescription() {
		return roleDescription;
	}

	public void setRoleDescription(String roleDescription) {
		this.roleDescription = roleDescription;
	}

}